<?php
/**
* phpCan - http://idc.anavallasuiza.com/
*
* phpCan is released under the GNU Affero GPL version 3
*
* More information at license.txt
*/

defined('ANS') or die();
?>

<!DOCTYPE html>

<html>
	<head>
		<?php include($Templates->load('head')); ?>
	</head>

	<body id="html" class="login">
		<?php if ($Vars->messageExists()) { ?>
			<div id="message" class="<?php echo $Vars->messageType(); ?>">
				<?php echo $Vars->message(); ?>
			</div>
		<?php } ?>
		
		<header>
			<?php include($Templates->load('header.php')); ?>
		</header>

		<section>
			<form action="<?php echo path(); ?>" method="post">
				<h1><?php __e('Please, login to enter in the Admin area:'); ?></h1>

				<fieldset>
					<?php echo $Form->hidden(getenv('HTTP_REFERER'), 'referer'); ?>

					<p><?php
					echo $Form->text(array(
						'name' => 'login[user]',
						'autofocus' => true,
						'label_text' => __('User')
					));
					?></p>

					<p><?php
					echo $Form->password(array(
						'name' => 'login[password]',
						'label_text' => __('Password'),
					));
					?></p>

					<p><?php
					echo $Form->submit(array(
						'name' => 'phpcan_action[login]',
						'value' => __('Login')
					));
					?></p>
				</fieldset>
			</form>
		</section>

		<footer>
			<a class="image" id="ans" href="http://anavallasuiza.com" title="Admin module is released by A navalla suíza">Admin module is released by A navalla suíza</a>
		</footer>
	</body>
</html>